package sg.edu.nus.iss.jass.dto;

import sg.edu.nus.iss.jass.datastore.BaseDTO;
import sg.edu.nus.iss.jass.util.Util;

public class Skill extends BaseDTO {

	private SkillReference skillRef;
	
	private String skillRefId;
	
	private int lvl;

	private int yearOfExp;
	
	/**
	 * @return the skillRef
	 */
	public SkillReference getSkillRef() {
	
		return skillRef;
	}

	
	/**
	 * @param skillRef the skillRef to set
	 */
	public void setSkillRef(SkillReference skillRef) {
	
		this.skillRef = skillRef;
	}

	
	/**
	 * @return the skillRefId
	 */
	public String getSkillRefId() {
		if(skillRef != null){
			return skillRef.getId();
		}
		if(!Util.isEmpty(skillRefId)) {
			return skillRefId;
		}
		return null;
	}

	
	/**
	 * @param skillRefId the skillRefId to set
	 */
	public void setSkillRefId(String skillRefId) {
	
		this.skillRefId = skillRefId;
	}





	/**
	 * @return the lvl
	 */
	public int getLvl() {

		return lvl;
	}

	/**
	 * @param lvl the lvl to set
	 */
	public void setLvl(int lvl) {

		this.lvl = lvl;
	}

	/**
	 * @return the yearOfExp
	 */
	public int getYearOfExp() {

		return yearOfExp;
	}

	/**
	 * @param yearOfExp the yearOfExp to set
	 */
	public void setYearOfExp(int yearOfExp) {

		this.yearOfExp = yearOfExp;
	}

}
